/*
** MSGBOX.C: Takes action based on the user's response to
** a message box.
*/

#include <pictor.h>

COLORSTRUCT msgcolors = {
   foreback(BOLD+WHITE,RED),
   foreback(BOLD+YELLOW,RED),
   foreback(BLACK,WHITE),
   foreback(BOLD+WHITE,WHITE)
};

void main()
{
   /* initialize library */
   initvideo();

   /* clear screen if user selects yes */
   if(messagebox("Do you want the screen cleared?",
      "Question",MB_YESNO,&msgcolors)) {

      vcolor(foreback(WHITE,BLACK));
      cls();
   }
}
